var CMS = {
    isValid: false,
    parseLoginInfo: function(loginInfo) {
	this.isValid = loginInfo.is_manager;
	if (this.isValid) {
	    var path = $.url().attr('path');
	    $.getScript('/js/cms'+path+'.js');
	}
    }
}

$(function() {
    $.ajax({
	url: 'rest/loginInfo.json',
	dataType: 'json',
	success: function(data) {
	    CMS.parseLoginInfo(data);
	},
	error: function(jqXHR, textStatus, errorThrown) {
	    alert(textStatus);
	}

    });
});